/* 限制天 */
export const disableConfig = (time:any) => {
    return time.getTime() < Date.now() - (3600 * 1000 * 24 * 1)
  }
  
  /* 限制时 */
  export const disabledHours = () => {
    
    const now = new Date();
    const arrs:any = [];
    for (let i = 0; i < 24; i++) {
      if (now.getHours() <= i) continue;
      arrs.push(i);
    }
    return arrs;
  };
  
  
  
  /* 限制分 */
  export const disabledMinutes = () => {
    const arrs = []
    for (let i = 0; i < 60; i++) {
       if (new Date().getMinutes() <= i) continue;
       arrs.push(i)
    }
    return arrs;
  }
  
  /* 限制秒 */
  export const disabledSeconds = () => {
    const arrs = []
    for (let i = 0; i < 60; i++) {
       if (new Date().getSeconds() <= i) continue;
       arrs.push(i)
    }
    return arrs;
  }
//   判断是否相同
  export const isDateTimeSameAsNow = (selectedDate:any) => {
    const now = new Date();
  
    return (
      selectedDate.getFullYear() === now.getFullYear() &&
      selectedDate.getMonth() === now.getMonth() &&
      selectedDate.getDate() === now.getDate() &&
      selectedDate.getHours() === now.getHours() &&
      selectedDate.getMinutes() === now.getMinutes() &&
      selectedDate.getSeconds() === now.getSeconds()
    );
  };
  
  